if [ ! -d "build" ]; then
  mkdir -p "build/lib"
  mkdir -p "build/bin"
fi

cmake -DDEV_PLATFORM=PROTOCOL -DCMAKE_TOOLCHAIN_FILE=./esp32_toolchain.cmake -B build .

if [ $? != 0 ]; then
  echo "make error!"
  exit 0
fi

if [ ! -d "out" ]; then
  mkdir -p "out/arm"
fi